<?php

namespace app\admin\model\wallet;

use think\Model;


class Log extends Model
{



    // 表名
    protected $name = 'wallet_log';

    // 自动写入时间戳字段
    protected $autoWriteTimestamp = 'int';

    // 定义时间戳字段名
    protected $createTime = 'createtime';
    protected $updateTime = false;
    protected $deleteTime = false;

    public function user()
    {
        return $this->hasOne('app\admin\model\User','id','user_id')->setEagerlyType(0)->field('username','id');
    }
    public function record()
    {
        return $this->hasOne('app\admin\model\wallet\Record','record_sn','record_sn')
            ->field('id,record_sn,type');
    }
    public function multiple()
    {
        return $this->hasOne('app\admin\model\WaterMultiple','record_sn','record_sn');
    }

}
